import pymysql



cnn=pymysql.connect(host='192.168.13.159')
cur=cnn.cursor()

sql1="update users set money=money-10 where s_name='李云';"
sql2="update users set money=money+10 where s_name='周梅';"
cnn.begin()
cur.execute(sql1)
cur.execute(sql2)
cnn.commit()
cur.close()
cnn.close()